﻿using System;
using System.Configuration;

namespace AT.IBMS.Framework.Configuration
{
    public class WeiXinElement : ConfigurationElement
    {

        [ConfigurationProperty("providers", IsRequired = true)]
        public ProviderSettingsCollection Providers
        {
            get
            {
                return (ProviderSettingsCollection)this["providers"];
            }
        }

        [ConfigurationProperty("providerName", IsRequired = true)]
        public string ProviderName
        {
            get
            {
                return (string)this["providerName"];
            }
        }

        [ConfigurationProperty("token", IsRequired = true)]
        public string Token
        {
            get
            {
                return (string)this["token"];
            }
        }

        [ConfigurationProperty("appId")]
        public string AppId
        {
            get
            {
                return (string)this["appId"];
            }
        }

        [ConfigurationProperty("appSecret")]
        public string AppSecret
        {
            get
            {
                return (string)this["appSecret"];
            }
        }

        [ConfigurationProperty("autoUpdateAccessToken", DefaultValue = false)]
        public bool AutoUpdateAccessToken
        {
            get
            {
                return (bool)this["autoUpdateAccessToken"];
            }
        }

        [ConfigurationProperty("apiUrl")]
        public string ApiUrl
        {
            get
            {
                return (string)this["apiUrl"];
            }
        }

        [ConfigurationProperty("fileUrl")]
        public string FileUrl
        {
            get
            {
                return (string)this["fileUrl"];
            }
        }

        [ConfigurationProperty("defaultDownloadFolderPath")]
        public string DefaultDownloadFolderPath
        {
            get
            {
                return (string)this["defaultDownloadFolderPath"];
            }
        }

    }
}
